<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@include file="/pageRc/common/common.jsp"%>
<head>
</head>
<script type="text/javascript">
    var path = "<%=commonPath%>";
    var msg = new msgTool();
    layui.use(
        ['form', 'layer', 'laytpl', 'laypage', 'laydate'],
        function () {
            var $ = layui.jquery, layer = layui.layer; //独立版的layer无需执行这一句
            var form = layui.form()
                , layer = layui.layer
                , laypage = layui.laypage
                , laytpl = layui.laytpl;
             form.on('select(proGroupSelect)', function(data){
            	 //修改项目经理登录时遇到的bug yf 2018.10.15
            	 var a=$("#positionType").val();
            	 if(a=="70"){
            		 return;
            	 }
            	var groupNo = data.value; //得到被选中的值
            	if(groupNo==null||groupNo==""){
            		groupNo='all';
            	}
            	
            	$("#proTeamNo").html("");
            	var option1 = $("<option>").val("暂无项目组").text("");
				$("#proTeamNo").append(option1);
				form.render('select');
            	$.ajax({
            		type:'POST',
            		url:'<%=commonPath %>/page/sys/'+groupNo+'/selectProTeamByGroupNo.do',
            		dataType:'JSON',
            		//data:'"groupNo="'+groupNo+'"',
            		success:function(data){
            			$("#proTeamNo").html("");
    					//value不给值追加不成功
    					$("#proTeamNo").append("<option value='all'>全选</option>");
    					form.render('select');
            				$.each(data.body.teanList,function(key,val){
            					var option1 = $("<option>").val(val.proTeamNo).text(val.proTeamName);
            					$("#proTeamNo").append(option1);
            					form.render('select');
            				});
            				$("#proTeamNo").get(0).selectedindex=0;
            				//清空项目组全选的val值
            				$('#proTeamNo option:first').val('');
            		}
            	})
            }); 
        });

</script>